package com.sky.task;

import com.sky.service.OrdersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class MyTask {
    @Autowired
    private OrdersService ordersService;
    /**
     * 定时任务 每隔五秒触发一次
     */
    /*@Scheduled(cron = "0 * * * * ?")
    public void executeTask(){
        ordersService.checkPayTimeOut();
    }*/

   /* @Scheduled(cron = "0 0 1 * * ?")
    public void executeTask1(){
        ordersService.checkProgressOrder();
    }*/
}
